package com.bing.controller.demo;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * Created by kaibb on 2016/6/10.
 */
@Controller
@RequestMapping(StudyController.PRE)
public class StudyController {

    private static final Logger LOGGER = LoggerFactory.getLogger(StudyController.class);
    public static final String PRE = "demo";

    @RequestMapping("{path}/{name}")
    public String gotoDemo(@PathVariable("path") String path, @PathVariable("name") String name) {
        LOGGER.info("进入页面: {}/{}", path, name);
        return PRE + "/" + path + "/" + name;
    }
}
